package com.tsing.cloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author TheTsing
 * @create 2021-11-13 17:56
 */
@RestController
@RequestMapping("/config")
@RefreshScope   //支持nacos的动态刷新功能
public class ConfigController {

    @Value("${config.info}")
    private String configInfo;

    @RequestMapping("/info")
    public String get() {
        return configInfo;
    }

}